import request from '@/utils/request'

// 获取sku列表 /admin/product/list/{page}/{limit} get
export function getSkuList(page, limit) {
  return request({
    url: `/admin/product/list/${page}/${limit}`,
    method: 'get'
  })
}

// sku上架地址 /admin/product/onSale/{skuId} 请求方式:get
export function onSale(skuId) {
  return request({
    url: `/admin/product/onSale/${skuId}`,
    method: 'get'
  })
}

// sku下架地址 /admin/product/cancelSale/{skuId} 请求地址:get
export function cancelSale(skuId) {
  return request({
    url: `/admin/product/cancelSale/${skuId}`,
    method: 'get'
  })
}
// sku删除地址 /admin/product/deleteSku/{skuId} 请求方式:delete
export function deleteSku(skuId) {
  return request({
    url: `/admin/product/deleteSku/${skuId}`,
    method: 'delete'
  })
}

// 获取sku商品属性 GET /admin/product/getSkuById/{skuId}
export function reqSkuById(skuId) {
  return request({
    url: `/admin/product/getSkuById/${skuId}`,
    method: 'get'
  })
}
